home *** CD-ROM | disk | FTP | other *** search
/ isnet Internet / Isnet Internet CD.iso / prog / chat / 12 / 12.exe / SYSTEM / BCKGRND.ALS < prev    next >
Encoding:
Text File  |  2000-03-17  |  18.1 KB  |  565 lines

  1. aecho {
  2.   if (($left($active,4) == @irc) && ($mid($active,5,1) isnum)) echo -a $ac(ircN>) $+ $1-
  3.   else echo -a $1-
  4. }
  5. bg {
  6.   if ($4) {
  7.     set %i.bg 0
  8.     :start
  9.     inc %i.bg
  10.     if (%i.bg <= $3) {
  11.       aline $1  $+ $2 $+ , $+ $2 $+ $str(á,$4) $+ 
  12.       goto start
  13.     }
  14.   }
  15.   elseif ($3) {
  16.     set %i.bg 0
  17.     :start1
  18.     inc %i.bg
  19.     if (%i.bg <= $3) {
  20.       aline $1  $+ $2 $+ , $+ $2 $+ $str(á,200) $+ 
  21.       goto start1
  22.     }
  23.   }
  24.   else iecho Syntax: /bg <@Window> <color> <lines> [width]
  25. }
  26. blink {
  27.   if ($7) {
  28.     set %i.blink 0
  29.     :start
  30.     inc %i.blink
  31.     if (%i.blink <= $4) {
  32.       rline $1 $5  $+ $2 $+ , $+ $3 $+ $str(á,$6) $+ $7- $+  $+ $2 $+ , $+ $3 $+ $str(á,256) $+ 
  33.       rline $1 $5  $+ $2 $+ , $+ $3 $+ $str(á,256) $+ 
  34.       goto start
  35.     }
  36.     rline $1 $5  $+ $2 $+ , $+ $3 $+ $str(á,$6) $+ $7- $+  $+ $2 $+ , $+ $3 $+ $str(á,256) $+ 
  37.   }
  38.   else iecho Syntax: /blink <@Window> <fore color> <back color> <repetitions> <line> <position> <text>
  39. }
  40. buff {
  41.   echo $1  
  42.   echo $1  
  43. }
  44. cclr {
  45.   .remove $tp(chan.txt)
  46.   :start
  47.   if ($findfile($tp,*.fld,1)) {
  48.     .remove $findfile($tp,*.fld,1)
  49.     goto start
  50.   }
  51. }
  52. ch {
  53.   if ($form(ircN,iecho)) set %h $readini %formats ircN iecho
  54.   else set %h [ $+ $hc(N) $+ ]
  55. }
  56. clock {
  57.   if ((?:00?m iswm $atime) || (?:30?m iswm $atime) && (%lastclock != $atime)) {
  58.     set %lastclock $atime
  59.     if (%clock == chan) amsg The time is now %lastclock %tz
  60.     elseif (%clock == echo) iecho The time is now $hc(%lastclock) $+ .
  61.   }
  62. }
  63. colchan {
  64.   if (%colnick == on) {
  65.     set %i.colchan 0
  66.     :start
  67.     inc %i.colchan
  68.     if ($chan(%i.colchan)) {
  69.       colnick $chan(%i.colchan)
  70.       goto start
  71.     }
  72.   }
  73. }
  74. colupdt {
  75.   if (%colnick == on) cline -r $ulcolor($2,$1,$level($address($2,5))) $1 $nick($1,$2)
  76. }
  77. colupdt2 {
  78.   if (%colnick == on) {
  79.     set %i.colupdt2 0
  80.     :start
  81.     inc %i.colupdt2
  82.     if ($hstmask($1,%i.colupdt2)) {
  83.       colupdt3 $hstmask($1,%i.colupdt2)
  84.       goto start
  85.     }
  86.   }
  87. }
  88. colupdt3 {
  89.   if (%colnick == on) {
  90.     set %i.colupdt3 0
  91.     :start
  92.     inc %i.colupdt3
  93.     if ($chan(%i.colupdt3)) {
  94.       set %j.colupdt3 0
  95.       :start2
  96.       inc %j.colupdt3
  97.       if ($ialchan($1,$chan(%i.colupdt3),%j.colupdt3)) {
  98.         cline -r $2 $ulcolor($ialchan($1,$chan(%i.colupdt3),%j.colupdt3).nick,$chan(%i.colupdt3),$level($1)) $chan(%i.colupdt3) $nick($chan(%i.colupdt3),$ialchan($1,$chan(%i.colupdt3),%j.colupdt3).nick)
  99.         goto start2
  100.       }
  101.       goto start
  102.     }
  103.   }
  104. }
  105. curchans {
  106.   unset %curchans
  107.   set %i.curchans 0
  108.   :start
  109.   inc %i.curchans
  110.   if ($chan(%i.curchans)) {
  111.     set %curchans $addtok(%curchans,$chan(%i.curchans),44)
  112.     goto start
  113.   }
  114. }
  115. dstat {
  116.   var %z = ircN.dccstatus
  117.   if ($dialog(%z) == $null) { .timerdstat off | return }
  118.   if (($send(0) == 0) && ($get(0) == 0)) {
  119.     dialog -x %z
  120.     return
  121.   }
  122.   if ($1 == -u) {
  123.     var %a = 1
  124.     while ($get(%a) != $null) {
  125.       did -a %z 3 %a $+ . $ifmatch
  126.       inc %a
  127.     }
  128.     set %a 1
  129.     while ($send(%a) != $null) {
  130.       did -a %z 13 %a $+ . $ifmatch
  131.       inc %a
  132.     }
  133.   }
  134.   var %y = $gettok($did(%z,3),1,46)
  135.   if ($did(%z,3) != $null) {
  136.     did -o %z 4 1 Nick: $get(%y) 
  137.     did -o %z 6 1 $round($get(%y).cps,1) cps
  138.     did -o %z 7 1 Complete: $get(%y).pc $+ %
  139.     did -o %z 9 1 $rsc($duration($div($sub($get(%y).size,$get(%y).rcvd),$get(%y).cps)))
  140.     did -o %z 11 1 $rsc($d.g(%y,$duration($div($get(%y).rcvd,$get(%y).cps))))
  141.     did -o %z 23 1 $get(%y).file
  142.   }
  143.   var %b = $gettok($did(%z,13),1,46)
  144.   if ($did(%z,13) != $null) {
  145.     did -o %z 14 1 Nick: $send(%b) 
  146.     did -o %z 16 1 $round($send(%b).cps,1) cps
  147.     did -o %z 17 1 Complete: $send(%b).pc $+ %
  148.     did -o %z 19 1 $rsc($duration($div($sub($send(%b).size,$send(%b).sent),$send(%b).cps)))
  149.     did -o %z 21 1 $rsc($d.g(%b,$duration($div($send(%b).sent,$send(%b).cps))))
  150.     did -o %z 25 1 $send(%b).file
  151.   }
  152. }
  153. ddeset {
  154.   .ddeserver off
  155.   set %i.ddeset 1
  156.   :loop
  157.   inc %i.ddeset
  158.   set %j.ddeset $dde ircN [ $+ [ %i.ddeset ] ] version ""
  159.   if ($dde ircN connected "" == $null) .ddeserver on ircN
  160.   elseif (%j.ddeset == $null) .ddeserver on ircN [ $+ [ %i.ddeset ] ]
  161.   else goto loop
  162. }
  163. default.setup {
  164.   var %a, %b, %y, %z
  165.   set %a 1
  166.   while ($gettok(channel.als query.als client.als stats.als toggles.als identfrs.als bckgrnd.als nukenab.als userlist.als,%a,32) != $null) {
  167.     set %z $ifmatch
  168.     if ($alias(%z) == $null) .load -a %z
  169.     inc %a
  170.   }
  171.   .load -ps spopup.pop
  172.   .load -pc cpopup.pop
  173.   .load -pq qpopup.pop
  174.   .load -pn npopup.pop
  175.   .load -pm mpopup.pop
  176.   .load -ru users.mrc
  177.   .load -rv vars.mrc
  178.   set %a 1
  179.   while ($gettok(events.mrc events2.mrc ctcps.mrc raw.mrc raw2.mrc raw3.mrc itelnet.mrc utils.mrc addon2.mrc themes.mrc idraw.mrc dialogs.mrc ircNgui1.mrc ircNgui2.mrc ucentral.mrc usersum.mrc maxtime.mrc notes.mrc,%a,32) != $null) {
  180.     set %z $ifmatch
  181.     if ($script(%z) == $null) .reload -rs %z
  182.     inc %a
  183.   }
  184.   if (%aver) {
  185.     set %a 1
  186.     while ($gettok(%aver,%a,32) != $null) {
  187.       set %z $ifmatch
  188.       set %b 1
  189.       while ($avar(%z,$addtok(alias,%b,0))) {
  190.         set %y $adn($ifmatch)
  191.         if ($alias(%y) == $null) .load -a %y
  192.         inc %b
  193.       }
  194.       set %b 1
  195.       while ($avar(%z,$addtok(script,%b,0))) {
  196.         set %y $adn($ifmatch)
  197.         if ($script(%y) == $null) .reload -rs %y
  198.         inc %b
  199.       }
  200.       inc %a
  201.     }
  202.   }
  203. }
  204. firstjoin {
  205.   unset %firstjoin
  206.   iecho ircN is now setting up your userlist. You must now add yourself to your userlist as owner.
  207.   set %owner $$?="Please choose a username."
  208.   adduser %owner $address($me,3)
  209.   chattr %owner ovfxjmncrp
  210.   iecho You have now been added to your userlist with full access. You must now set a password
  211.   chpass %owner $$?*="Enter your password.  If you forget it, simply type '/chpass [ %owner ] passwordhere'"
  212. }
  213. get.dns {
  214.   write -c $tp(icmp.txt)
  215.   write $tp(icmp.txt) exit $chr(123) set % $+ iploc $ $+ swlc(@ICMPáScanner) $vl window -c @ICMPáScanner $vl set % $+ ip2loc $ $+ swlc(@DNS) $vl window -c @DNS $vl .remove $tp(temp.txt) $chr(125)
  216.   write $tp(icmp.txt) -
  217.   window -a @ICMPáScanner %iploc $tp(icmp.txt) FixedSys 9
  218.   window -a @DNS %ip2loc $tp(icmp.txt) FixedSys 9
  219.   aline @ICMPáScanner . $+ $str(-,22) $+ .
  220.   aline @ICMPáScanner $vl $fix(20,ICMP Scan Results) $vl
  221.   aline @ICMPáScanner $vl $+ $str(-,22) $+ $vl
  222.   aline @ICMPáScanner $fix(22,$vl) $vl
  223.   set %i.get.dns 3
  224.   :start
  225.   inc %i.get.dns
  226.   if (%i.get.dns <= $pls($lines($tp(temp.txt)),1)) {
  227.     set %tmp.get.dns $read -nl [ $+ [ %i.get.dns ] ] $tp(temp.txt)
  228.     set %tmp.get.dns $gettok(%tmp.get.dns,1,32)
  229.     if ($count(%tmp.get.dns,.) == 3) {
  230.       write $tp(icmp.txt) %tmp.get.dns
  231.       write $tp(icmp.txt) .dns $chr(123) dns %tmp.get.dns $chr(125)
  232.       write $tp(icmp.txt) .find nick $chr(123) nickfind %tmp.get.dns $chr(125)
  233.       aline @ICMPáScanner $vl $lfix(2,$sub(%i.get.dns,3)) $+ . $fix(16,%tmp.get.dns) $vl
  234.       goto start
  235.     }
  236.     aline @ICMPáScanner ' $+ $str(-,22) $+ '
  237.     unset %tmp*
  238.   }
  239. }
  240. get.bot.ops {
  241.   if ($2) {
  242.     if (($chkflag($usr($2),$1,g)) && ($2 isop $1) && ($botpass($usr($2)))) {
  243.       if ($chkflag($usr($2),$1,b)) {
  244.         qmsg $2 op $botpass($usr($2)) $1
  245.         echo $1 %h Requesting ops from $hc($2) [[ $+ $remove($address($2,0),*!) $+ ]] $rbrk(eggdrop) in $hc($1)
  246.       }
  247.       elseif ($chkflag($usr($2),$1,i)) {
  248.         qctcp $2 OP $botpass($usr($2)) $1
  249.         echo $1 %h Requesting ops from $hc($2) [[ $+ $remove($address($2,0),*!) $+ ]] $rbrk(ircN) in $hc($1)
  250.       }
  251.     }
  252.     return
  253.   }
  254.   set %i.get.bot.ops 0
  255.   :loop
  256.   inc %i.get.bot.ops
  257.   if ($nick($1,%i.get.bot.ops)) {
  258.     if (($chkflag($usr($nick($1,%i.get.bot.ops)),$1,g)) && ($nick($1,%i.get.bot.ops) isop $1) && ($botpass($usr($nick($1,%i.get.bot.ops))))) {
  259.       if ($chkflag($usr($nick($1,%i.get.bot.ops)),$1,b)) {
  260.         qmsg $nick($1,%i.get.bot.ops) op $botpass($usr($nick($1,%i.get.bot.ops))) $1
  261.         echo $1 %h Requesting ops from $hc($nick($1,%i.get.bot.ops)) [[ $+ $remove($address($nick($1,%i.get.bot.ops),0),*!) $+ ]] $rbrk(eggdrop) in $hc($1)
  262.       }
  263.       elseif ($chkflag($usr($nick($1,%i.get.bot.ops)),$1,i)) {
  264.         qctcp $nick($1,%i.get.bot.ops) OP $botpass($usr($nick($1,%i.get.bot.ops))) $1
  265.         echo $1 %h Requesting ops from $hc($nick($1,%i.get.bot.ops)) [[ $+ $remove($address($nick($1,%i.get.bot.ops),0),*!) $+ ]] $rbrk(ircN) in $hc($1)
  266.       }
  267.       else goto loop
  268.     }
  269.     else goto loop
  270.   }
  271. }
  272. idchk {
  273.   set %i.idchk 0
  274.   :start
  275.   inc %i.idchk
  276.   if ($chan(%i.idchk)) {
  277.     if (($isvalidchan(%idchan,$chan(%i.idchk))) && ($me isop $chan(%i.idchk))) idle -k $chan(%i.idchk)
  278.     goto start
  279.   }
  280. }
  281. iecho {
  282.   if (($left($active,4) == @irc) && ($mid($active,5,1) isnum)) echo -ai2 $ac(irc) $+ $hc(N) $+ $ac(:) $+ %h $1-
  283.   elseif ($active == @ircII) echo -ai2 %h $1-
  284.   elseif ($left($active,1) == @) echo -si2 %h $1-
  285.   else echo -ai2 %h $1-
  286. }
  287. iiecho {
  288.   if (($left($active,4) == @irc) && ($mid($active,5,1) isnum)) echo -ai2 $ac(ircN>) $+ $1-
  289.   elseif ($active == @ircII) echo -ai2 $1-
  290.   elseif ($left($active,1) == @) echo -si2 $1-
  291.   else echo -ai2 $1-
  292. }
  293. splash {
  294.   if (%splash == on) {
  295.     window -ahfkp +be @Splash $getcenter($pic(ircn.bmp).width,$pic(ircn.bmp).height)
  296.     window -a @Splash
  297.     drawpic @Splash 0 0 ircn.bmp
  298.     .timer 1 2 window -c @Splash
  299.   }
  300. }
  301. isunset unset %dir.* %rawcode.* %i2.* %remote.* %temp.* %tmp.* %i.* %j.* %k.* %idchktimer %idletimer %xdcc.timer* %btfldtimer %qp.timer
  302. iunset unset %last* %splitin %dchans %duchan %hchan %holdtopic.* %pt %f11cmd %f12cmd %tmp.* %i.* %j.* %k.* %whois %joinedchans %rawcode.* %spoofchk* %telnet.* %caps.* %bt.dont.* %autocycle.chan %it.timer %xdccnicks
  303. netset {
  304.   if ($3 == hybrid6) set %efnet.hybrid6 $true
  305.   else set %efnet.hybrid6 $false
  306.   if ($1 == unknown) {
  307.     .timer 1 0 set % $+ irc.network $ $+ ?="ircN was unable to determine your IRC network. $crlf $+ Please enter your current IRC network" $vl .server -a $server -g % $+ irc.network -d % $+ irc.network $ $+ + : $server $vl netset % $+ irc.network $2
  308.     return
  309.   }
  310.   set %irc.network $1
  311.   set %modesonline $2
  312.   if (%autojoin == on) {
  313.     iecho Press $hc(F11) within the next 5 seconds to cancel autojoin for %irc.network $+ .
  314.     .timerautojoin 1 5 join %autojoin. [ $+ [ %irc.network ] ] $vl unset % $+ f11cmd
  315.     set %f11cmd .timer 1 0 .timerautojoin off $vl iecho Autojoin for this session was cancelled. To manually trigger autojoin, press $hc(F11) again. $vl set % $+ f11cmd .timer 1 0 join %autojoin. [ $+ [ %irc.network ] ]  $ $+ vl unset % $ $+ + f11cmd
  316.   }
  317.   else {
  318.     iecho Press $hc(F11) within the next 5 seconds to enable and apply autojoin for %irc.network $+ .
  319.     set %f11cmd .timer 1 0 iecho Autojoin for %irc.network enabled, applying now! $vl join %autojoin. [ $+ [ %irc.network ] ]
  320.   }
  321. }
  322. nline {
  323.   if ($me ison %nameschannel) set %tmp.nline echo %nameschannel
  324.   else set %tmp.nline iiecho
  325.   if ($form(nicklist,top)) %tmp.nline $readini %formats nicklist top
  326.   else %tmp.nline $lfix(3,.) $+ $str(-,15) $+ . $+ $str(-,15) $+ . $+ $str(-,15) $+ . $+ $str(-,15) $+ .
  327.   set %i.nline 1
  328.   :start
  329.   if ($gettok($1-,%i.nline,32)) {
  330.     if ($form(nicklist,names)) %tmp.nline $readini %formats nicklist names
  331.     else %tmp.nline $lfix(3,$vl) $fix(13,$nll($gettok($1-,%i.nline,32))) $vl $fix(13,$nll($gettok($1-,$pls(1,%i.nline),32))) $vl $fix(13,$nll($gettok($1-,$pls(2,%i.nline),32))) $vl $fix(13,$nll($gettok($1-,$pls(3,%i.nline),32))) $vl
  332.     if ($form(nicklist,namecount)) inc %i.nline $readini %formats nicklist namecount
  333.     else inc %i.nline 4      
  334.     goto start
  335.   }
  336.   if ($form(nicklist,bottom)) %tmp.nline $readini %formats nicklist bottom
  337.   else %tmp.nline $lfix(3,') $+ $str(-,15) $+ ' $+ $str(-,15) $+ ' $+ $str(-,15) $+ ' $+ $str(-,15) $+ '
  338. }
  339. ns.nick {
  340.   set %i.ns.nick 0
  341.   :start
  342.   inc %i.ns.nick
  343.   if ($gettok($ns.rnick($2,%i.ns.nick),1,32) == $1) return
  344.   elseif ($ns.rnick($2,%i.ns.nick)) goto start
  345.   else writeini -n $tp(wholeft.txt) $2 n [ $+ [ %i.ns.nick ] ] $1 $ticks
  346. }
  347. ns.serv {
  348.   set %i.ns.serv 0
  349.   :start
  350.   inc %i.ns.serv
  351.   if (($gettok($ns.rserv(%i.ns.serv),1,38) == $1) && ($gettok($ns.rserv(%i.ns.serv),2,38) == $2)) return
  352.   elseif ($ns.rserv(%i.ns.serv)) goto start
  353.   else writeini -n $tp(wholeft.txt) splitservers n [ $+ [ %i.ns.serv ] ] $1 $+ & $+ $2
  354. }
  355. online {
  356.   inc %pong
  357.   if ((%lag != off) && (%pongi // %pong)) .ctcpreply $me LAGSTAT $ticks
  358.   if (($away == $false) && (%autoaway == on) && ($idle >= %idle) && ($sub($ctime,%backtime) >= %idle)) {
  359.     if (%awaycmd) %awaycmd $autoawymsg
  360.     else away $autoawymsg
  361.   }
  362.   clock
  363.   set %i.online 0
  364.   :start
  365.   inc %i.online
  366.   if ($chan(%i.online)) {
  367.     if (($me ison $chan(%i.online)) && ($chan(%i.online).ial == $false) && ($findtok(%joinedchans,$chan(%i.online),1,44) == $null)) {
  368.       set %joinedchans $addtok(%joinedchans,$chan(%i.online),44)
  369.       .who $chan(%i.online)
  370.     }
  371.     goto start
  372.   }
  373. }
  374. qplay {
  375.   if ($exists($2) == $false) iecho /qplay: $2 file doesn't exist.
  376.   elseif (($1 == -s) && ($4)) {
  377.     set %i.qplay -1
  378.     :loop
  379.     inc %i.qplay
  380.     $5- $readini $2 $3 n [ $+ [ %i.qplay ] ]
  381.     if ($pls(%i.qplay,1) < $4) goto loop
  382.   }
  383.   elseif (($1 == -f) && ($2)) {
  384.     set %i.qplay 0
  385.     :start
  386.     inc %i.qplay
  387.     $3- $read -l [ $+ [ %i.qplay ] ] $2
  388.     if (%i.qplay < $lines($2)) goto start
  389.   }
  390.   elseif (($1 == -r) && ($4)) {
  391.     set %i.qplay $3
  392.     :start
  393.     inc %i.qplay
  394.     $5- $read -l [ $+ [ %i.qplay ] ] $2
  395.     if (%i.qplay < $4) goto start
  396.   }
  397.   elseif (($1 == -d) && ($3)) {
  398.     set %qp.i 1
  399.     set %qp.file $2
  400.     set %qp.lines $lines($2)
  401.     set %qp.delay $3
  402.     $4- $read -l1 $2
  403.     if (%qp.lines > 1) {
  404.       .timer 1 $3 qplay -cont $2 $4-
  405.       set %qp.timer $ltimer
  406.     }
  407.   }
  408.   elseif (($1 == -cont) && ($2)) {
  409.     inc %qp.i
  410.     $3- $read -l [ $+ [ %qp.i ] ] $2
  411.     if (%qp.i < %qp.lines) {
  412.       .timer 1 %qp.delay qplay $1-
  413.       set %qp.timer $ltimer
  414.     }
  415.     else unset %qp.file %qp.delay %qp.lines
  416.   }
  417.   elseif (($1 == stop) && (%qp.file)) {
  418.     .timer [ $+ [ %qp.timer ] ] off
  419.     unset %qp.file %qp.delay %qp.lines
  420.   }
  421.   else iecho Syntax: /qplay <-r|-s|-f|-d|stop> <filename> [section|start|delay] [lines|end] [command]
  422. }
  423. qctcp .quote PRIVMSG $1 : $+ $2- $+ 
  424. qnotice .quote NOTICE $1 : $+ $2-
  425. qmsg .quote PRIVMSG $1 : $+ $2-
  426. putserv write $queue1 $1-
  427. puthelp write $queue2 $1-
  428. queuemsg {
  429.   var %x, %y, %z
  430.   set %x $queue1
  431.   set %y $queue2
  432.   if (%queuenum == $null) set %queuenum 1
  433.   if (%queuenum == 1) {
  434.     set %queuenum 2
  435.     if ($exists(%x) == $false) write -c %x
  436.     set %z $read -nl1 %x
  437.     write -dl1 %x
  438.     if (%z != $null) {
  439.       .quote %z
  440.       return
  441.     }
  442.   }
  443.   if (%queuenum == 2) {
  444.     set %queuenum 1
  445.     if ($exists(%y) == $false) write -c %y
  446.     set %z $read -nl1 %y
  447.     write -dl1 %y
  448.     if (%z != $null) {
  449.       .quote %z
  450.       return
  451.     }
  452.   }
  453. }
  454. secho echo -s $1-
  455. tb {
  456.   if ($server) titlebar $oc(%clocktb,$atime) [[ $me ]] [[ $+ $usermode on $server ( $+ %irc.network $+ )] $tchan $iif($a.numsg,$ab($addtok(m:,$a.numsg,0))) $iif($pages,$ab($addtok(p:,$pages,0))) $hlag $iif($away,$ab(away)) $oc(%xdccs,xdcc) $iif($sock(irc2.*,0),$ab($addtok(irc2,$sock(irc2.*,0),58))) $oc(%tdaemon,$tflags) $oc(%ircii,ircii) $oc(%rawreveal,raw)
  457.   else {
  458.     .timers off
  459.     titlebar [[ Not Connected ]] [[ $strip(%ver) ]]
  460.   }
  461. }
  462. tbg {
  463.   if ($4) {
  464.     set %i.tbg 0
  465.     :start
  466.     inc %i.tbg
  467.     if (%i.tbg <= $3) {
  468.       rline $1 %i.tbg 1, $+ $2 $+ $str(á,$4) $+ 
  469.       goto start
  470.     }
  471.   }
  472.   elseif ($3) {
  473.     set %i.tbg 0
  474.     :start1
  475.     inc %i.tbg
  476.     if (%i.tbg <= $3) {
  477.       rline $1 %i.tbg 1, $+ $2 $+ $str(á,200) $+ 
  478.       goto start1
  479.     }
  480.   }
  481.   else iecho Syntax: /tbg <@Window> <color> <lines> [width]
  482. }
  483. timoff {
  484.   if ($1) .timer [ $+ [ $1 ] ] off
  485.   if ($2) unset % [ $+ [ $2 ] ]
  486. }
  487. toggle {
  488.   if (% [ $+ [ $1 ] ] == on) set % [ $+ [ $1 ] ] off
  489.   else set % [ $+ [ $1 ] ] on
  490. }
  491. tsound {
  492.   if ((%theme == on) && ($themevar($1) == on)) {
  493.     set %tmp.tsound $themedir $+ $readini $themedir(%themename) default $1-
  494.     if (($exists(%tmp.tsound)) && ($nopath(%tmp.tsound))) .splay %tmp.tsound
  495.   }
  496. }
  497. verset {
  498.   set %iver ircN 7.24
  499.   set %ver %iver + 7.0
  500.   set %reldate (2000/03/17 22.00)
  501.   set %irc2.ver irc2 v3.0
  502. }
  503. wcln {
  504.   .remove $tp(wholeft.txt)
  505.   .remove $tp(whopop.txt)
  506.   set %netjoin on
  507.   unset %split*
  508. }
  509. whecho {
  510.   if ((%whoiswin == on) && ($window(@Whois))) echo $colour(Whois) @Whois $1-
  511.   elseif (%whoiswin == on) { window -an @Whois %whloc @Whois Courier New 412 | echo $colour(Whois) @Whois $1- }
  512.   elseif (($left($active,4) == @irc) && ($mid($active,5,1) isnum)) echo $colour(Whois) -ai2 $ac(ircN>) $+ $1-
  513.   elseif ($active == @ircII) echo $colour(Whois) -ai2 $1-
  514.   elseif ($left($active,1) == @) echo $colour(Whois) -si2 $1-
  515.   else echo $colour(Whois) -ai2 $1-
  516. }
  517. wlmv {
  518.   if ($7 == $null) {
  519.     iecho Syntax: /wlmv <@Window> <fore color> <back color> <line> <start> <end> <text>
  520.     return
  521.   }
  522.   set %i.wlmv $sub($5,1)
  523.   :start
  524.   inc %i.wlmv
  525.   if (%i.wlmv <= $6) {
  526.     rline $1 $4  $+ $2 $+ , $+ $+ $3 $+ $str(á,%i.wlmv) $+ $7- $+  $+ $2 $+ , $+ $3 $+ $str(á,150) $+ 
  527.     goto start
  528.   }
  529. }
  530. wrmv {
  531.   if ($7 == $null) {
  532.     iecho Syntax: /wrmv <@Window> <fore color> <back color> <line> <start> <end> <text>
  533.     return
  534.   }
  535.   set %i.wrmv $pls($5,1)
  536.   :start
  537.   dec %i.wrmv
  538.   if (%i.wrmv >= $6) {
  539.     rline $1 $4  $+ $2 $+ , $+ $3 $+ $str(á,%i.wrmv) $+ $7- $+ $str(á,$sub($sub($5,%i.wrmv),$len($7-)))
  540.     goto start
  541.   }
  542. }
  543. word.wrap {
  544.   if (^ !isin $2-) iecho Syntax: /wordwrap <length> <command>^[footer]^<text>
  545.   else {
  546.     set %ww.cmd $gettok($2-,1,94)
  547.     if ($gettok($2-,3,94)) {
  548.       set %ww.fot $gettok($2-,2,94)
  549.       set %ww.txt $gettok($2-,3-,94)
  550.     }
  551.     else set %ww.txt $remove($2-,%ww.cmd,^)
  552.     set %ww.m $div($len(%ww.txt),$1)
  553.     %ww.cmd $left(%ww.txt,$1) %ww.fot
  554.     set %i.word.wrap 0
  555.     :start
  556.     inc %i.word.wrap
  557.     if (%i.word.wrap == %ww.m) %ww.cmd $mid(%ww.txt,$mpy($1,%i.word.wrap),$1) $fix($sub($1,$len($mid(%ww.txt,$mpy($1,%i.word.wrap),$1),1)),) %ww.fot
  558.     else {
  559.       %ww.cmd $mid(%ww.txt,$mpy($1,%i.word.wrap),$1) %ww.fot
  560.       goto start
  561.     }
  562.     unset %ww.*
  563.   }
  564. }
  565.